Skip to content

Conversation

@yomybaby
Copy link
Member

@yomybaby yomybaby commented Oct 21, 2025

Resolves #4426 (FR-1577)

Summary

Improve dashboard statistics display design and progress visualization by refactoring the BAIStatistic component and standardizing progress display across dashboard components.

Changes

  • Refactored BAIStatistic component to use progressMode prop instead of showProgress
  • Replaced custom progress steps implementation with Ant Design Progress component
  • Added three progress modes: 'normal', 'ghost', and 'hidden'
  • Updated all dashboard components to use the new progress mode system
  • Improved visual consistency across resource statistics displays
  • Enhanced styling with better background colors and layout

Affected Components

  • packages/backend.ai-ui/src/components/BAIStatistic.tsx
  • packages/backend.ai-ui/src/components/ResourceStatistics.tsx
  • react/src/components/AgentStats.tsx
  • react/src/components/MyResource.tsx
  • react/src/components/MyResourceWithinResourceGroup.tsx
  • react/src/components/SessionCountDashboardItem.tsx
  • react/src/components/TotalResourceWithinResourceGroup.tsx

Copy link
Member Author

yomybaby commented Oct 21, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link

github-actions bot commented Oct 21, 2025

Coverage report for ./packages/backend.ai-ui

St.
Category Percentage Covered / Total
🔴 Statements 51.38% 130/253
🔴 Branches 30.3% 80/264
🔴 Functions 34.48% 20/58
🔴 Lines 53.85% 119/221

Test suite run success

55 tests passing in 3 suites.

Report generated by 🧪jest coverage report action from 1e11ddf

@github-actions
Copy link

github-actions bot commented Oct 21, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 4.67% 532/11384
🔴 Branches 3.79% 302/7974
🔴 Functions 2.88% 102/3538
🔴 Lines 4.62% 514/11124

Test suite run success

121 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from 1e11ddf

@graphite-app graphite-app bot changed the base branch from feat_FR-1575_/merge-dashboard to graphite-base/4427 October 22, 2025 09:27
@yomybaby yomybaby marked this pull request as ready for review October 22, 2025 09:35
@yomybaby yomybaby force-pushed the style/FR-1577-improve-dashboard-statistics-design branch from 504b143 to 8fcc687 Compare October 23, 2025 02:22
@yomybaby yomybaby changed the base branch from graphite-base/4427 to main October 23, 2025 02:22
@github-actions github-actions bot added size:L 100~500 LoC and removed size:M 30~100 LoC labels Oct 23, 2025
Copy link
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image.png

can you remove top padding of session count?

@yomybaby yomybaby force-pushed the style/FR-1577-improve-dashboard-statistics-design branch from 8fcc687 to e6beb7a Compare October 28, 2025 06:47
Copilot AI review requested due to automatic review settings October 28, 2025 06:47
@github-actions github-actions bot added size:XL 500~ LoC and removed size:L 100~500 LoC labels Oct 28, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the dashboard statistics display design by standardizing how progress indicators are shown across components. The main change replaces a boolean showProgress prop with a more flexible progressMode prop that supports three states: 'normal', 'ghost', and 'hidden'. The implementation migrates from custom progress steps to Ant Design's Progress component for better visual consistency.

Key Changes:

  • Introduced progressMode prop replacing showProgress in BAIStatistic component
  • Replaced custom progress bar implementation with Ant Design Progress component
  • Updated styling and typography properties across statistics components for improved visual consistency

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/backend.ai-ui/src/components/BAIStatistic.tsx Core refactoring: replaced boolean showProgress with progressMode, implemented Ant Design Progress component, updated styling
packages/backend.ai-ui/src/components/ResourceStatistics.tsx Updated to use new progressMode prop, added conditional styling based on display type
react/src/components/AgentStats.tsx Updated prop from showProgress={true} to progressMode="normal"
react/src/components/MyResource.tsx Updated prop from showProgress={true} to progressMode="normal"
react/src/components/MyResourceWithinResourceGroup.tsx Updated prop from showProgress={false} to progressMode="ghost"
react/src/components/TotalResourceWithinResourceGroup.tsx Updated prop from showProgress={true} to progressMode="normal"
react/src/components/SessionCountDashboardItem.tsx Replaced BAIPanelItem with BAIStatistic using progressMode="hidden", updated layout styling
react/src/components/BAIPanelItem.tsx Removed strong prop from Typography components
react/src/components/StorageStatusPanelCard.tsx Removed unused usePrimaryColors import, updated Typography components, added color prop to BAIPanelItem
react/src/components/StorageStatusPanel.tsx File completely deleted (348 lines removed)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@graphite-app
Copy link

graphite-app bot commented Oct 28, 2025

Merge activity

…ess visualization (#4427)

Resolves #4426 ([FR-1577](https://lablup.atlassian.net/browse/FR-1577))

## Summary
Improve dashboard statistics display design and progress visualization by refactoring the BAIStatistic component and standardizing progress display across dashboard components.

## Changes
- Refactored `BAIStatistic` component to use `progressMode` prop instead of `showProgress`
- Replaced custom progress steps implementation with Ant Design Progress component
- Added three progress modes: 'normal', 'ghost', and 'hidden'
- Updated all dashboard components to use the new progress mode system
- Improved visual consistency across resource statistics displays
- Enhanced styling with better background colors and layout

## Affected Components
- `packages/backend.ai-ui/src/components/BAIStatistic.tsx`
- `packages/backend.ai-ui/src/components/ResourceStatistics.tsx`
- `react/src/components/AgentStats.tsx`
- `react/src/components/MyResource.tsx`
- `react/src/components/MyResourceWithinResourceGroup.tsx`
- `react/src/components/SessionCountDashboardItem.tsx`
- `react/src/components/TotalResourceWithinResourceGroup.tsx`

[FR-1577]: https://lablup.atlassian.net/browse/FR-1577?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app bot force-pushed the style/FR-1577-improve-dashboard-statistics-design branch from e6beb7a to 1e11ddf Compare October 28, 2025 07:22
@graphite-app graphite-app bot merged commit 1e11ddf into main Oct 28, 2025
11 checks passed
@graphite-app graphite-app bot deleted the style/FR-1577-improve-dashboard-statistics-design branch October 28, 2025 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve dashboard statistics display design and progress visualization

4 participants